#ifndef SMART_HOME_H
#define SMART_HOME_H

#include <QWidget>
#include "my_mouse.h"
#include <QPixmap>
#include <QTimer>
#include <QTcpServer>
#include <QTcpSocket>
#include <QMessageBox>
namespace Ui {
class smart_home;
}

class smart_home : public QWidget
{
    Q_OBJECT

public:
    explicit smart_home(QWidget *parent = nullptr);
    ~smart_home();

    QTcpSocket *socket ;
    QTcpServer *server ;

    bool l1,l3,f1; //灯(l1,l3)与空调（f1）状态
    QTimer *timer_f1; //定时器
    double currentValue;  //温度当前值
signals:
    void closef1();

public slots:
    void openf1();//温度到达打开空调
    void updateValueDown();//温度下降
private:
    Ui::smart_home *ui;
};

#endif // SMART_HOME_H
